package com.ruoyi.common.constant;

import java.io.Serializable;

public class CommonConstant implements Serializable {

	/**  */
	private static final long serialVersionUID = 3157433005750702397L;

	public final static int CODE_OVER_TIMES = 15;
	
	public static enum TYPE {
		MOBILE("手机短信") ;

		private String cnName;

		TYPE(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (TYPE item : TYPE.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum CODE_TYPE {
		FORGET_PASSWORD("忘记密码"),
		
		MOBILE_BING("手机绑定"), 
		STORE_CREATE("门店预约");

		private String cnName;

		CODE_TYPE(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (CODE_TYPE item : CODE_TYPE.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum SEND_STATUS {
		CREATE("新建"), SENDING("发送中"), SENDED("已发送"), CANCEL("已取消");
		private String cnName;

		SEND_STATUS(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (SEND_STATUS item : SEND_STATUS.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}

	public static enum SHIYONG_STATUS {
		UNUSE("未使用"), USED("已使用");
		private String cnName;

		SHIYONG_STATUS(String name) {
			this.cnName = name;
		}

		public String getCode() {
			return this.name();
		}

		public String getCnName() {
			return this.cnName;
		}

		public static String getCnName(String code) {
			for (SHIYONG_STATUS item : SHIYONG_STATUS.values()) {
				if (item.getCode().equals(code)) {
					return item.getCnName();
				}
			}
			return code;
		}

		public String toString() {
			return this.name();
		}
	}
	
	public static enum IMAGE_TYPE{
		WX_INDEX("首页图片"),
		WX_LOGIN("登陆页图片"),
		
		SITE_AUTH("登陆授权图片"),
		SITE_MOBILE("手机授权图片"),
		GUIDE("引导首页"),
		GUIDE_BANGMAI("引导帮卖"),
		GUIDE_GONGYING("引导供应"),
		HEADER_ACTIVITY_DETAIL("活动详情页"),
		HEADER_ACTIVITY_CREATE("开团页面"),
		HEADER_USER("会员中心");
		
		
		private String cnName;
		IMAGE_TYPE(String name){
			this.cnName=name;
		}
		public String getCode(){
			return this.name();
		}
		public String getCnName(){
			return this.cnName;
		}
		public static String getCnName(String code){
			for(IMAGE_TYPE item: IMAGE_TYPE.values()){
				if(item.getCode().equals(code))
				{
					return item.getCnName();
				}
			}
			return code;
		}
		public String toString(){
			return "code:"+this.name()+",cnName:"+this.cnName;
		}
	}

}
